package com.cskaoyan.controller;

import com.cskaoyan.bean.BaseRespVo;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * 请求头限定
 */
@Controller
@ResponseBody
public class HeaderLimitController {

    @RequestMapping(value = "header/limit", headers = "aaa")
    public BaseRespVo headerlimit() {
        return BaseRespVo.ok("header limit");
    }

    //Accept:produces
    @RequestMapping(value = "accept",produces = "application/json")
    public BaseRespVo accept() {
        return BaseRespVo.ok("accept");
    }

    //Content-Type:consumes
    @RequestMapping(value = "contenttype", consumes = "songge/niupi")
    public BaseRespVo contenttype() {
        return BaseRespVo.ok("contenttype");
    }
}
